import java.io.File;
import java.net.URLEncoder;

import com.seguim.cache.CacheManager;
import com.seguim.cache.FileUtil;

public class TestCache {

	public void test() throws Exception {

		int cacheSize = 45 * 1024 * 1024; //45 Mb
		int numFilesInCache = 10000;
		CacheManager c = CacheManager.getInstance("/home/comsegui/cache", "/home/comsegui/cache", cacheSize, numFilesInCache);
		//c.put(FileUtil.getBytesFromFile(new File("C:\\Downloads\\kaplan_180.wma")), URLEncoder.encode("/Downloads/kaplan_180.wma", "UTF-8"));
		//c.put(FileUtil.getBytesFromFile(new File("C:\\Downloads\\kaplan_168.wma")), URLEncoder.encode("/Downloads/kaplan_168.wma", "UTF-8"));
		//c.put(FileUtil.getBytesFromFile(new File("C:\\Downloads\\kaplan_170.wma")), URLEncoder.encode("/Downloads/kaplan_170.wma", "UTF-8"));
	}

	public void test2() throws Exception {
	}

	public static void main(String args[]) throws Exception {
		new TestCache().test();
	}
}
